<script setup lang="ts">
const sayHi = () => {
  alert('欢迎')
}
</script>

<!-- 2. 结构 -->
<template>
  <button @click="sayHi">点我试试</button>
  <button @mouseenter="sayHi">移到到这里</button>
  <h1 @mouseenter="sayHi">移动到这里</h1>
</template>
<!-- 3. 样式 -->
<style scoped></style>
